package by.pavlyukevich.paymentsystem.datamodel.payment;

import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;

import by.pavlyukevich.paymentsystem.datamodel.AbstractEntity;
import by.pavlyukevich.paymentsystem.datamodel.erip.EripName;

@Entity
public class PaymentDetail extends AbstractEntity<Integer> {

	@ManyToOne(fetch = FetchType.LAZY)
	private PaymentType paymentType;

	@Column
	private String personalAccount;

	@ManyToMany(mappedBy = "paymentDetails")
	private Set<EripName> eripNames;

	public PaymentType getPaymentType() {
		return paymentType;
	}

	public void setPaymentType(PaymentType paymentType) {
		this.paymentType = paymentType;
	}

	public String getPersonalAccount() {
		return personalAccount;
	}

	public void setPersonalAccount(String personalAccount) {
		this.personalAccount = personalAccount;
	}

	public Set<EripName> getEripNames() {
		return eripNames;
	}

	public void setEripNames(Set<EripName> eripNames) {
		this.eripNames = eripNames;
	}

}
